<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 28/9/2017
 * Time: 下午 10:39
 */

namespace app\common\model;



class Deal extends Base
{
    public function getNormalDeals($data = []) {
        $data['status'] = 1;
        $order = ['id'=>'desc'];

        $result = $this->where($data)
            ->order($order)
            ->paginate();

        // echo $this->getLastSql();
        return  $result;
    }

    public function getApplyDeals($data = []) {
        $data['status'] = 0;
        $order = ['id'=>'desc'];

        $result = $this->where($data)
            ->order($order)
            ->paginate();

        //echo $this->getLastSql();
        return  $result;
    }

}